{template 'header',$module}
{if $action == 'email'}
{if $itemid==1}
<div class="warn">尊敬的用户，为了保证信息的真实有效，请先<strong>认证</strong>您的<strong>Email</strong>，认证通过之后即可发布信息</div>
{/if}
<div class="menus">
	<table cellpadding="0" cellspacing="0">
		<tr>
			<td class="tab_on" id="Tab0"><a href="?action={$action}"><span>1、发送认证信</span></a></td>
			<td class="tab_nav">&nbsp;</td>
			<td class="tab" id="Tab1"><a href="?action={$action}"><span>2、接收认证信</span></a></td>
			<td class="tab_nav">&nbsp;</td>
			<td class="tab" id="Tab2"><a href="?action={$action}"><span>3、通过认证</span></a></td>
		</tr>
	</table>
</div>
<form method="post" action="validate.php" onsubmit="return check();" id="dform">
	<input type="hidden" name="action" value="{$action}"/>
	<table class="data-form">
		<tr>
			<th width="90"><span class="cred">*</span> 您的Email</th>
			<td class="tr"><input type="text" size="30" name="email" id="email" value="{$user[email]}"/> <span id="demail" class="cred"></span></td>
		</tr>
		<tr>
			<th width="90"><span class="cred">*</span> 验证码</th>
			<td class="tr">{template 'captcha', 'chip'} <span id="dcaptcha" class="cred"></span></td>
		</tr>
		<tr>
			<th width="90">提示信息</th>
			<td class="tr">提交后，系统将发送一封验证邮件至您的Email，请接收邮件完成认证</td>
		</tr>
		<tr>
			<th width="90">&nbsp;</th>
			<td class="tr" height="30"><input type="submit" name="submit" value=" 下一步 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 返 回 " class="btn" onclick="history.back(-1);"/></td>
		</tr>
	</table>
</form>
<script type="text/javascript">
	function check() {
		if ( Dd('email').value.length < 7 ) {
			Dmsg('请填写Email', 'email');
			return false;
		}
		if ( !is_captcha(Dd('captcha').value) ) {
			Dmsg('请填写正确的验证码', 'captcha');
			return false;
		}
		return true;
	}
</script>
{elseif $action == 'vemail'}
<div class="menus">
	<table cellpadding="0" cellspacing="0">
		<tr>
			<td class="tab_on" id="Tab0"><a href=""><span>邮件认证</span></a></td>
		</tr>
	</table>
</div>
<table cellpadding="10" cellspacing="1" class="tb">
	<tr>
		<th width="90">邮件地址</th>
		<td class="tr"><strong>{$_email}</strong> <a href="send.php?action=email" class="t">[修改]</a></td>
	</tr>
	<tr>
		<th width="90">认证状态</th>
		<td class="tr f_green">已认证</td>
	</tr>
</table>
{elseif $action == 'mobile'}
{if $itemid==1}
<div class="warn">尊敬的用户，为了保证信息的真实有效，请先<strong>认证</strong>您的<strong>手机号码</strong>，认证通过之后即可发布信息</div>
{/if}
<div class="menus">
	<table cellpadding="0" cellspacing="0">
		<tr>
			<td class="tab_on" id="Tab0"><a href="?action={$action}"><span>1、发送认证码</span></a></td>
			<td class="tab_nav">&nbsp;</td>
			<td class="tab" id="Tab1"><a href="?action={$action}&code=1"><span>2、接收认证码</span></a></td>
			<td class="tab_nav">&nbsp;</td>
			<td class="tab" id="Tab2"><a href="?action={$action}"><span>3、通过验证</span></a></td>
		</tr>
	</table>
</div>
	{if isset($code)}
	<form method="post" action="validate.php" onsubmit="return check();" id="dform">
		<input type="hidden" name="action" value="{$action}"/>
		<table class="data-form">
			<tr>
				<th width="90"><span class="cred">*</span> 认证码</th>
				<td class="tr"><input type="text" size="10" name="auth" id="auth"/> <span id="dauth" class="cred"></span> 请输入你收到的短信认证码</td>
			<tr>
				<th width="90">&nbsp;</th>
				<td class="tr" height="30"><input type="submit" value=" 下一步 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 重 发 " class="btn" onclick="Go('?action={$action}');"/></td>
			</tr>
		</table>
	</form>
	<script type="text/javascript">
		Dd('Tab0').className = 'tab';
		Dd('Tab1').className = 'tab_on';
		function check() {
			if ( Dd('auth').value.length < 6 ) {
				Dmsg('请填写认证码', 'auth');
				return false;
			}
			return true;
		}
	</script>
		{else}
	<form method="post" action="validate.php" onsubmit="return check();" id="dform">
		<input type="hidden" name="action" value="{$action}"/>
		<table class="data-form">
			<tr>
				<th width="90"><span class="cred">*</span> 您的手机号码</th>
				<td class="tr"><input type="text" size="30" name="mobile" id="mobile" value="{$user[mobile]}"/> <span id="dmobile" class="cred"></span></td>
			</tr>
			{if $fee && $_sms<1}
				<tr>
					<th width="90">接收短信收费</th>
					<td class="tr"><span class="f_b cred">{$fee}</span> {$DT[money_unit]}</td>
				</tr>
				<tr>
					<th width="90">帐户余额</th>
					<td class="tr"><span class="f_b f_blue">{$_money}</span> {$DT[money_unit]} {if $fee>$_money}&nbsp;<span class="cred">余额不足</span>&nbsp;{/if} <a href="charge.php?action=pay" class="t" target="_blank">[充值]</a></td>
				</tr>
				<tr>
					<th width="90"><span class="cred">*</span> 支付密码</th>
					<td class="tr">{template 'password', 'chip'} <span id="dpassword" class="cred"></span></td>
				</tr>
			{/if}
			<tr>
				<th width="90">提示信息</th>
				<td class="tr">提交后，系统将发送一条短信至您的手机号码，请注意接收</td>
			</tr>
			<tr>
				<th width="90">&nbsp;</th>
				<td class="tr" height="30"><input type="submit" name="submit" value=" 下一步 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 返 回 " class="btn" onclick="history.back(-1);"/></td>
			</tr>
		</table>
	</form>
	<script type="text/javascript">
		function check() {
			if ( Dd('mobile').value.length < 7 ) {
				Dmsg('请填写手机号码', 'mobile');
				return false;
			}
			{if $fee && $_sms<1}
			if ( Dd('password').value.length < 6 ) {
				Dmsg('请填写支付密码', 'password');
				return false;
			}
			{/if}
			return true;
		}
	</script>
	{/if}
{elseif $action == 'vmobile'}
<div class="menus">
	<table cellpadding="0" cellspacing="0">
		<tr>
			<td class="tab_on" id="Tab0"><a href=""><span>手机认证</span></a></td>
		</tr>
	</table>
</div>
<table cellpadding="10" cellspacing="1" class="tb">
	<tr>
		<th width="90">手机号码</th>
		<td class="tr"><strong>{$user[mobile]}</strong> <a href="send.php?action=mobile" class="t">[修改]</a></td>
	</tr>
	<tr>
		<th width="90">认证状态</th>
		<td class="tr f_green">已认证</td>
	</tr>
</table>
{elseif $action == 'truename'}
	{if $itemid==1}
	<div class="warn">尊敬的用户，为了保证信息的真实有效，请先<strong>认证</strong>您的<strong>真实姓名</strong>，认证通过之后即可发布信息</div>
	{/if}
<div class="main-block bd-gray mt10">
	<div class="hd fn-clear">
		<h2 class="fn-left">营业执照</h2>
	</div>
	<ul id="data-nav" class="main-nav mt10 fn-clear">
		<li ><a href="?action={$action}"><span>1、提交证件</span></a></li>
		<li ><a href="?action={$action}"><span>2、通过认证</span></a></li>
	</ul>
<form method="post" action="validate.php" onsubmit="return check();" id="dform">
	<input type="hidden" name="action" value="{$action}"/>
	<table class="data-form">
		<tr>
			<th width="90"><span class="cred">*</span> 真实姓名</th>
			<td class="tr"><input type="text" size="10" name="truename" id="truename" value="{$user[truename]}"/> <span id="dtruename" class="cred"></span></td>
		</tr>
		<tr>
			<th width="90"><span class="cred">*</span> 证件图片</th>
			<td class="tr"><input name="thumb" id="thumb" type="text" size="60" readonly/>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="Dthumb({$moduleid},0,0, Dd('thumb').value, true);" class="t">[上传]</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="_preview(Dd('thumb').value);"
			</td>
		</tr>
		<tr>
			<th width="90">证件图片</th>
			<td class="tr"><input name="thumb1" id="thumb1" type="text" size="60" readonly/>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="Dthumb({$moduleid},0,0, Dd('thumb1').value, true, 'thumb1');" class="t">[上传]</a>&nbsp;&nbsp;<a href="javascript:void(0);"
			                                                                                                                                                                                                                                  onclick="_preview(Dd('thumb1').value);" class="t">[预览]</a>&nbsp;&nbsp;<a
					href="javascript:void(0);" onclick="Dd('thumb1').value='';" class="t">[删除]</a></td>
		</tr>
		<tr>
			<th width="90">证件图片</th>
			<td class="tr"><input name="thumb2" id="thumb2" type="text" size="60" readonly/>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="Dthumb({$moduleid},0,0, Dd('thumb2').value, true, 'thumb2');" class="t">[上传]</a>&nbsp;&nbsp;<a href="javascript:void(0);"
			                                                                                                                                                                                                                                  onclick="_preview(Dd('thumb2').value);" class="t">[预览]</a>&nbsp;&nbsp;<a
					href="javascript:void(0);" onclick="Dd('thumb2').value='';" class="t">[删除]</a></td>
		</tr>
		<tr>
			<th width="90">认证说明</th>
			<td class="tr lh18">
				请上传个人有效证件（身份证或护照等）电子版本，以便网站核实认证<br/>
				证件上的姓名必须与填写的真实姓名一致<br/>
				最少需要上传1张，最多可上传3张
			</td>
		</tr>
		<tr>
			<th width="90">&nbsp;</th>
			<td class="tr" height="30"><input type="submit" name="submit" value=" 确 定 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 返 回 " class="btn" onclick="history.back(-1);"/></td>
		</tr>
	</table>
</form>

<script type="text/javascript">
	function check() {
		if ( Dd('truename').value.length < 2 ) {
			Dmsg('请填写真实姓名', 'truename');
			return false;
		}
		if ( Dd('thumb').value.length < 15 ) {
			Dmsg('请上传证件图片', 'thumb');
			return false;
		}
		return true;
	}
</script>
{elseif $action == 'vtruename'}
<div class="menus">
	<table cellpadding="0" cellspacing="0">
		<tr>
			<td class="tab_on" id="Tab0"><a href=""><span>实名认证</span></a></td>
		</tr>
	</table>
</div>
<table cellpadding="10" cellspacing="1" class="tb">
	<tr>
		<th width="90">真实姓名</th>
		<td class="tr f_b">{$user[truename]}</td>
	</tr>
	{if $user[vtruename] || $v[status] == 3}
		<tr>
			<th width="90">认证状态</th>
			<td class="tr f_green">已认证</td>
		</tr>
		{else}
		<tr>
			<th width="90">认证状态</th>
			<td class="tr cred">审核中</td>
		</tr>
	{/if}
</table>
{elseif $action == 'company'}
	{if $itemid==1}
	<div class="warn">尊敬的用户，为了保证信息的真实有效，请先<strong>认证</strong>您的<strong>企业信息</strong>，认证通过之后即可发布信息</div>
	{/if}
	<div class="main-block bd-gray mt10">
		<div class="hd fn-clear">
			<h2 class="fn-left">营业执照</h2>
		</div>
		<ul id="data-nav" class="main-nav mt10 fn-clear">
		<li id="status_"><a href="?action={$action}"><span>1、提交证件</span></a></li>
		<li id="status_3"><a href="?action={$action}"><span>2、通过认证</span></a></li>
		</ul>
	<form method="post" action="validate.php"  name="pub-form">
	<input type="hidden" name="action" value="{$action}"/>
	<table class="data-form">
		<tr>
			<th width="90"><span class="cred">*</span> 企业名</th>
			<td class="tr"><input type="text" size="60" name="company" id="company" value="{$user[company]}"/></td>
		</tr>
		<tr>
			<th width="90"><span class="cred">*</span> 证件图片</th>
			<td width="640">{Post::picture($moduleid, 'thumb', 'thumb', $thumb ,$MOD['thumb_width'], $MOD['thumb_height'])}</td>
		</tr>
		<tr>
			<th width="90">证件图片</th>
			<td width="640">{Post::picture($moduleid, 'thumb', 'thumb1', $thumb1 ,$MOD['thumb_width'], $MOD['thumb_height'])}</td>
		</tr>
		<tr>
			<th width="90">证件图片</th>
			<td width="640">{Post::picture($moduleid, 'thumb', 'thumb2', $thumb2 ,$MOD['thumb_width'], $MOD['thumb_height'])}</td>
		</tr>
		<tr>
			<th width="90">认证说明</th>
			<td class="tr lh18">
				请上传真实有效的营业执照电子版，以便于网站核实认证。可以附带上传企业法人身份证等复印件，更能增加企业可信度。<br/>
				证件上的企业名称必须与填写的企业名称一致<br/>
				最少需要上传1张，最多可上传3张
			</td>
		</tr>
		<tr>
			<th width="90">&nbsp;</th>
			<td class="sub-info">
				<button type="submit" class="btn" name="submit">确 定</button>
				<input type="button" value=" 返 回 " class="btn" onclick="history.back(-1);"/>
			</td>
		</tr>
	</table>
</form>
		<script type="text/javascript">
			seajs.use(['$','easyui','easyui-css'], function ($) {
				$('#pub-form').on('submit', function(){
					return $('#pub-form').form('validate');
				});
			});
		</script>
{elseif $action == 'vcompany'}
<div class="main-block bd-gray mt10">
   <div class="hd fn-clear">
		<h2 class="fn-left">企业认证</h2>
	</div>
<table class="data-form">
	<tr>
		<th width="90">企业名</th>
		<td class="tr f_b">{$user[company]}</td>
	</tr>
	{if $user[vcompany] || $v[status] == 3}
		<tr>
			<th width="90">认证状态</th>
			<td class="tr f_green">您的营业执照已认证</td>
		</tr>
	{else}
		<tr>
			<th width="90">认证状态</th>
			<td class="tr cred">营业执照审核中</td>
		</tr>
	{/if}
</table>
{elseif $action == 'bank'}
<div class="menus">
	<table cellpadding="0" cellspacing="0">
		<tr>
			<td class="tab_on" id="Tab0"><a href="?action={$action}"><span>银行帐号验证</span></a></td>
			<td class="tab_nav">&nbsp;</td>
			<td class="tab" id="Tab1"><a href="cash.php?action=setting"><span>银行帐号设置</span></a></td>
		</tr>
	</table>
</div>
<table cellpadding="10" cellspacing="1" class="tb">
	<tr>
		<th width="90">收款方式</th>
		<td class="tr">{if $user[bank]}{$user[bank]}{else}未设置{/if}</td>
	</tr>
	<tr>
		<th width="90">收款帐号</th>
		<td class="tr">{if $user[account]}{$user[account]}{else}未设置{/if}</td>
	</tr>
	<tr>
		<th width="90">收款人</th>
		<td class="tr">{$user[truename]}</td>
	</tr>
	{if $user[vbank]}
		<tr>
			<th width="90">认证状态</th>
			<td class="tr f_green">已认证</td>
		</tr>
	{else}
		<tr>
			<th width="90">认证状态</th>
			<td class="tr f_gray">未认证</td>
		</tr>
		<tr>
			<th width="90">认证说明</th>
			<td class="tr cred">银行帐号在申请提现后，由网站进行认证</td>
		</tr>
	{/if}
</table>
{/if}
</div>
		<script type="text/javascript">
			seajs.use(['member'], function(member){
				member.active('menu_general', 'instrument', 'status_{$status}')
			})
		</script>
{template 'footer',$module}